package com.wing.wecom.controller;

import chat.qiye.wechat.sdk.api.material.MediaDownloadApi;
import feign.Param;
import feign.Response;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 素材
 * @author : Hui.Wang [huzi.wh@gmail.com]
 * @version : 1.0
 * @date : 2021/9/14
 */
@RestController
public class MediaController {

    @Resource
    MediaDownloadApi mediaDownloadApi;

    /**
     * 获取临时素材
     * @return
     */
    @GetMapping("/media/get")
    public Response download(@Param("media_id") String media_id) {
        return mediaDownloadApi.download(media_id);
    }

}
